package com.hxexp.weixin.test.api;

import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;

import com.hxexp.weixin.common.exception.APIException;
import com.hxexp.weixin.hpe.api.orderdetail.OrderDetailAPI;
import com.hxexp.weixin.hpe.api.orderdetail.model.OrderDetailParamBean;
import com.hxexp.weixin.hpe.api.orderdetail.model.OrderDetailResultBean;
import com.hxexp.weixin.test.runner.JUnit4WithSpringLogClassRunner;

/**
 * 订单详情接口实现类测试
 *
 * @author wang.bin
 *
 */
@RunWith(JUnit4WithSpringLogClassRunner.class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@ContextConfiguration(locations = { "classpath:conf/spring/spring-biz.xml", "classpath:conf/spring/spring-ehcache.xml" })
public class OrderDetailAPIImplTester {

    @Autowired
    private OrderDetailAPI orderDetailAPI;

    @Test
    public void testCase01() throws APIException {

        OrderDetailParamBean orderDetailParamBean = new OrderDetailParamBean();
        OrderDetailResultBean returnValue = new OrderDetailResultBean();
        // 设置请求参数
        orderDetailParamBean.setOrderId("9f453861286b49c2a6ba380842690701");

        returnValue = orderDetailAPI.getOrderDetail(orderDetailParamBean);
        System.out.println(returnValue);
    }

}
